package com.gw.controller;

import com.gw.pojo.dto.FileUploadRequestDTO;
import com.gw.pojo.vo.FileUploadRequestVO;
import com.gw.result.Result;
import com.gw.service.impl.FileUploadRequestServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/fileUploader")
@Slf4j
public class FileUploadRequestController {

    @Autowired
    private FileUploadRequestServiceImpl fileUploadRequestService;
    @RequestMapping("/upload")
    public Result<FileUploadRequestVO> upload(FileUploadRequestDTO fileUploadRequestDTO) {

        FileUploadRequestVO resultVO=fileUploadRequestService.uploadFile(fileUploadRequestDTO);
        return Result.success(resultVO);
    }
}
